\(\int \frac {(a+b \log (c (d+e x)^n))^2}{(f+g x)^3} \, dx\) [50]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [C] (warning: unable to verify)
   Fricas [F]
   Sympy [F]
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 24, antiderivative size = 202 \[ \int \frac {\left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(f+g x)^3} \, dx=-\frac {b e n (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )}{(e f-d g)^2 (f+g x)}-\frac {\left (a+b \log \left (c (d+e x)^n\right )\right )^2}{2 g (f+g x)^2}+\frac {b^2 e^2 n^2 \log (f+g x)}{g (e f-d g)^2}-\frac {b e^2 n \left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (1+\frac {e f-d g}{g (d+e x)}\right )}{g (e f-d g)^2}+\frac {b^2 e^2 n^2 \operatorname {PolyLog}\left (2,-\frac {e f-d g}{g (d+e x)}\right )}{g (e f-d g)^2} \]

[Out]

-b*e*n*(e*x+d)*(a+b*ln(c*(e*x+d)^n))/(-d*g+e*f)^2/(g*x+f)-1/2*(a+b*ln(c*(e*x+d)^n))^2/g/(g*x+f)^2+b^2*e^2*n^2*
ln(g*x+f)/g/(-d*g+e*f)^2-b*e^2*n*(a+b*ln(c*(e*x+d)^n))*ln(1+(-d*g+e*f)/g/(e*x+d))/g/(-d*g+e*f)^2+b^2*e^2*n^2*p
olylog(2,(d*g-e*f)/g/(e*x+d))/g/(-d*g+e*f)^2

Rubi [A] (verified)

Time = 0.22 (sec) , antiderivative size = 202, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.292, Rules used = {2445, 2458, 2389, 2379, 2438, 2351, 31} \[ \int \frac {\left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(f+g x)^3} \, dx=-\frac {b e^2 n \log \left (\frac {e f-d g}{g (d+e x)}+1\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{g (e f-d g)^2}-\frac {b e n (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )}{(f+g x) (e f-d g)^2}-\frac {\left (a+b \log \left (c (d+e x)^n\right )\right )^2}{2 g (f+g x)^2}+\frac {b^2 e^2 n^2 \operatorname {PolyLog}\left (2,-\frac {e f-d g}{g (d+e x)}\right )}{g (e f-d g)^2}+\frac {b^2 e^2 n^2 \log (f+g x)}{g (e f-d g)^2} \]

[In]

Int[(a + b*Log[c*(d + e*x)^n])^2/(f + g*x)^3,x]

[Out]

-((b*e*n*(d + e*x)*(a + b*Log[c*(d + e*x)^n]))/((e*f - d*g)^2*(f + g*x))) - (a + b*Log[c*(d + e*x)^n])^2/(2*g*
(f + g*x)^2) + (b^2*e^2*n^2*Log[f + g*x])/(g*(e*f - d*g)^2) - (b*e^2*n*(a + b*Log[c*(d + e*x)^n])*Log[1 + (e*f
 - d*g)/(g*(d + e*x))])/(g*(e*f - d*g)^2) + (b^2*e^2*n^2*PolyLog[2, -((e*f - d*g)/(g*(d + e*x)))])/(g*(e*f - d
*g)^2)

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 2351

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_) + (e_.)*(x_)^(r_.))^(q_), x_Symbol] :> Simp[x*(d + e*x^r)^(q +
 1)*((a + b*Log[c*x^n])/d), x] - Dist[b*(n/d), Int[(d + e*x^r)^(q + 1), x], x] /; FreeQ[{a, b, c, d, e, n, q,
r}, x] && EqQ[r*(q + 1) + 1, 0]

Rule 2379

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((x_)*((d_) + (e_.)*(x_)^(r_.))), x_Symbol] :> Simp[(-Log[1 +
d/(e*x^r)])*((a + b*Log[c*x^n])^p/(d*r)), x] + Dist[b*n*(p/(d*r)), Int[Log[1 + d/(e*x^r)]*((a + b*Log[c*x^n])^
(p - 1)/x), x], x] /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[p, 0]

Rule 2389

Int[(((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_))^(q_))/(x_), x_Symbol] :> Dist[1/d, Int[(d
 + e*x)^(q + 1)*((a + b*Log[c*x^n])^p/x), x], x] - Dist[e/d, Int[(d + e*x)^q*(a + b*Log[c*x^n])^p, x], x] /; F
reeQ[{a, b, c, d, e, n}, x] && IGtQ[p, 0] && LtQ[q, -1] && IntegerQ[2*q]

Rule 2438

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 2445

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_)*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Simp[(f
 + g*x)^(q + 1)*((a + b*Log[c*(d + e*x)^n])^p/(g*(q + 1))), x] - Dist[b*e*n*(p/(g*(q + 1))), Int[(f + g*x)^(q
+ 1)*((a + b*Log[c*(d + e*x)^n])^(p - 1)/(d + e*x)), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*
f - d*g, 0] && GtQ[p, 0] && NeQ[q, -1] && IntegersQ[2*p, 2*q] && ( !IGtQ[q, 0] || (EqQ[p, 2] && NeQ[q, 1]))

Rule 2458

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_.) + (g_.)*(x_))^(q_.)*((h_.) + (i_.)*(x_))
^(r_.), x_Symbol] :> Dist[1/e, Subst[Int[(g*(x/e))^q*((e*h - d*i)/e + i*(x/e))^r*(a + b*Log[c*x^n])^p, x], x,
d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, h, i, n, p, q, r}, x] && EqQ[e*f - d*g, 0] && (IGtQ[p, 0] || IGtQ[
r, 0]) && IntegerQ[2*r]

Rubi steps \begin{align*} \text {integral}& = -\frac {\left (a+b \log \left (c (d+e x)^n\right )\right )^2}{2 g (f+g x)^2}+\frac {(b e n) \int \frac {a+b \log \left (c (d+e x)^n\right )}{(d+e x) (f+g x)^2} \, dx}{g} \\ & = -\frac {\left (a+b \log \left (c (d+e x)^n\right )\right )^2}{2 g (f+g x)^2}+\frac {(b n) \text {Subst}\left (\int \frac {a+b \log \left (c x^n\right )}{x \left (\frac {e f-d g}{e}+\frac {g x}{e}\right )^2} \, dx,x,d+e x\right )}{g} \\ & = -\frac {\left (a+b \log \left (c (d+e x)^n\right )\right )^2}{2 g (f+g x)^2}-\frac {(b n) \text {Subst}\left (\int \frac {a+b \log \left (c x^n\right )}{\left (\frac {e f-d g}{e}+\frac {g x}{e}\right )^2} \, dx,x,d+e x\right )}{e f-d g}+\frac {(b e n) \text {Subst}\left (\int \frac {a+b \log \left (c x^n\right )}{x \left (\frac {e f-d g}{e}+\frac {g x}{e}\right )} \, dx,x,d+e x\right )}{g (e f-d g)} \\ & = -\frac {b e n (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )}{(e f-d g)^2 (f+g x)}-\frac {\left (a+b \log \left (c (d+e x)^n\right )\right )^2}{2 g (f+g x)^2}-\frac {b e^2 n \left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (1+\frac {e f-d g}{g (d+e x)}\right )}{g (e f-d g)^2}+\frac {\left (b^2 e n^2\right ) \text {Subst}\left (\int \frac {1}{\frac {e f-d g}{e}+\frac {g x}{e}} \, dx,x,d+e x\right )}{(e f-d g)^2}+\frac {\left (b^2 e^2 n^2\right ) \text {Subst}\left (\int \frac {\log \left (1+\frac {e f-d g}{g x}\right )}{x} \, dx,x,d+e x\right )}{g (e f-d g)^2} \\ & = -\frac {b e n (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )}{(e f-d g)^2 (f+g x)}-\frac {\left (a+b \log \left (c (d+e x)^n\right )\right )^2}{2 g (f+g x)^2}+\frac {b^2 e^2 n^2 \log (f+g x)}{g (e f-d g)^2}-\frac {b e^2 n \left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (1+\frac {e f-d g}{g (d+e x)}\right )}{g (e f-d g)^2}+\frac {b^2 e^2 n^2 \text {Li}_2\left (-\frac {e f-d g}{g (d+e x)}\right )}{g (e f-d g)^2} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.12 (sec) , antiderivative size = 204, normalized size of antiderivative = 1.01 \[ \int \frac {\left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(f+g x)^3} \, dx=\frac {-\left (a+b \log \left (c (d+e x)^n\right )\right )^2+\frac {e (f+g x) \left (2 b (e f-d g) n \left (a+b \log \left (c (d+e x)^n\right )\right )+e (f+g x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2-2 b^2 e n^2 (f+g x) (\log (d+e x)-\log (f+g x))-2 b e n (f+g x) \left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (\frac {e (f+g x)}{e f-d g}\right )-2 b^2 e n^2 (f+g x) \operatorname {PolyLog}\left (2,\frac {g (d+e x)}{-e f+d g}\right )\right )}{(e f-d g)^2}}{2 g (f+g x)^2} \]

[In]

Integrate[(a + b*Log[c*(d + e*x)^n])^2/(f + g*x)^3,x]

[Out]

(-(a + b*Log[c*(d + e*x)^n])^2 + (e*(f + g*x)*(2*b*(e*f - d*g)*n*(a + b*Log[c*(d + e*x)^n]) + e*(f + g*x)*(a +
 b*Log[c*(d + e*x)^n])^2 - 2*b^2*e*n^2*(f + g*x)*(Log[d + e*x] - Log[f + g*x]) - 2*b*e*n*(f + g*x)*(a + b*Log[
c*(d + e*x)^n])*Log[(e*(f + g*x))/(e*f - d*g)] - 2*b^2*e*n^2*(f + g*x)*PolyLog[2, (g*(d + e*x))/(-(e*f) + d*g)
]))/(e*f - d*g)^2)/(2*g*(f + g*x)^2)

Maple [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 1.35 (sec) , antiderivative size = 661, normalized size of antiderivative = 3.27

method result size
risch \(-\frac {b^{2} \ln \left (\left (e x +d \right )^{n}\right )^{2}}{2 \left (g x +f \right )^{2} g}+\frac {b^{2} n \,e^{2} \ln \left (\left (e x +d \right )^{n}\right ) \ln \left (e x +d \right )}{g \left (d g -e f \right )^{2}}-\frac {b^{2} n e \ln \left (\left (e x +d \right )^{n}\right )}{g \left (d g -e f \right ) \left (g x +f \right )}-\frac {b^{2} n \,e^{2} \ln \left (\left (e x +d \right )^{n}\right ) \ln \left (g x +f \right )}{g \left (d g -e f \right )^{2}}-\frac {b^{2} n^{2} e^{2} \ln \left (e x +d \right )^{2}}{2 g \left (d g -e f \right )^{2}}-\frac {b^{2} n^{2} e^{2} \ln \left (e x +d \right )}{g \left (d g -e f \right )^{2}}+\frac {b^{2} n^{2} e^{2} \ln \left (g x +f \right )}{g \left (d g -e f \right )^{2}}+\frac {b^{2} n^{2} e^{2} \operatorname {dilog}\left (\frac {\left (g x +f \right ) e +d g -e f}{d g -e f}\right )}{g \left (d g -e f \right )^{2}}+\frac {b^{2} n^{2} e^{2} \ln \left (g x +f \right ) \ln \left (\frac {\left (g x +f \right ) e +d g -e f}{d g -e f}\right )}{g \left (d g -e f \right )^{2}}+\left (-i b \pi \,\operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right ) \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i \left (e x +d \right )^{n}\right )+i \pi \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2} b +i \pi \,\operatorname {csgn}\left (i \left (e x +d \right )^{n}\right ) \operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2} b -i \pi \operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right )^{3} b +2 b \ln \left (c \right )+2 a \right ) b \left (-\frac {\ln \left (\left (e x +d \right )^{n}\right )}{2 \left (g x +f \right )^{2} g}+\frac {n e \left (\frac {e \ln \left (e x +d \right )}{\left (d g -e f \right )^{2}}-\frac {1}{\left (d g -e f \right ) \left (g x +f \right )}-\frac {e \ln \left (g x +f \right )}{\left (d g -e f \right )^{2}}\right )}{2 g}\right )-\frac {{\left (-i b \pi \,\operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right ) \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i \left (e x +d \right )^{n}\right )+i \pi \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2} b +i \pi \,\operatorname {csgn}\left (i \left (e x +d \right )^{n}\right ) \operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2} b -i \pi \operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right )^{3} b +2 b \ln \left (c \right )+2 a \right )}^{2}}{8 \left (g x +f \right )^{2} g}\) \(661\)

[In]

int((a+b*ln(c*(e*x+d)^n))^2/(g*x+f)^3,x,method=_RETURNVERBOSE)

[Out]

-1/2*b^2*ln((e*x+d)^n)^2/(g*x+f)^2/g+b^2/g*n*e^2*ln((e*x+d)^n)/(d*g-e*f)^2*ln(e*x+d)-b^2/g*n*e*ln((e*x+d)^n)/(
d*g-e*f)/(g*x+f)-b^2/g*n*e^2*ln((e*x+d)^n)/(d*g-e*f)^2*ln(g*x+f)-1/2*b^2/g*n^2*e^2/(d*g-e*f)^2*ln(e*x+d)^2-b^2
/g*n^2*e^2/(d*g-e*f)^2*ln(e*x+d)+b^2/g*n^2*e^2/(d*g-e*f)^2*ln(g*x+f)+b^2/g*n^2*e^2/(d*g-e*f)^2*dilog(((g*x+f)*
e+d*g-e*f)/(d*g-e*f))+b^2/g*n^2*e^2/(d*g-e*f)^2*ln(g*x+f)*ln(((g*x+f)*e+d*g-e*f)/(d*g-e*f))+(-I*b*Pi*csgn(I*c*
(e*x+d)^n)*csgn(I*c)*csgn(I*(e*x+d)^n)+I*Pi*csgn(I*c)*csgn(I*c*(e*x+d)^n)^2*b+I*Pi*csgn(I*(e*x+d)^n)*csgn(I*c*
(e*x+d)^n)^2*b-I*Pi*csgn(I*c*(e*x+d)^n)^3*b+2*b*ln(c)+2*a)*b*(-1/2*ln((e*x+d)^n)/(g*x+f)^2/g+1/2/g*n*e*(e/(d*g
-e*f)^2*ln(e*x+d)-1/(d*g-e*f)/(g*x+f)-e/(d*g-e*f)^2*ln(g*x+f)))-1/8*(-I*b*Pi*csgn(I*c*(e*x+d)^n)*csgn(I*c)*csg
n(I*(e*x+d)^n)+I*Pi*csgn(I*c)*csgn(I*c*(e*x+d)^n)^2*b+I*Pi*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)^2*b-I*Pi*csgn
(I*c*(e*x+d)^n)^3*b+2*b*ln(c)+2*a)^2/(g*x+f)^2/g

Fricas [F]

\[ \int \frac {\left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(f+g x)^3} \, dx=\int { \frac {{\left (b \log \left ({\left (e x + d\right )}^{n} c\right ) + a\right )}^{2}}{{\left (g x + f\right )}^{3}} \,d x } \]

[In]

integrate((a+b*log(c*(e*x+d)^n))^2/(g*x+f)^3,x, algorithm="fricas")

[Out]

integral((b^2*log((e*x + d)^n*c)^2 + 2*a*b*log((e*x + d)^n*c) + a^2)/(g^3*x^3 + 3*f*g^2*x^2 + 3*f^2*g*x + f^3)
, x)

Sympy [F]

\[ \int \frac {\left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(f+g x)^3} \, dx=\int \frac {\left (a + b \log {\left (c \left (d + e x\right )^{n} \right )}\right )^{2}}{\left (f + g x\right )^{3}}\, dx \]

[In]

integrate((a+b*ln(c*(e*x+d)**n))**2/(g*x+f)**3,x)

[Out]

Integral((a + b*log(c*(d + e*x)**n))**2/(f + g*x)**3, x)

Maxima [F]

\[ \int \frac {\left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(f+g x)^3} \, dx=\int { \frac {{\left (b \log \left ({\left (e x + d\right )}^{n} c\right ) + a\right )}^{2}}{{\left (g x + f\right )}^{3}} \,d x } \]

[In]

integrate((a+b*log(c*(e*x+d)^n))^2/(g*x+f)^3,x, algorithm="maxima")

[Out]

a*b*e*n*(e*log(e*x + d)/(e^2*f^2*g - 2*d*e*f*g^2 + d^2*g^3) - e*log(g*x + f)/(e^2*f^2*g - 2*d*e*f*g^2 + d^2*g^
3) + 1/(e*f^2*g - d*f*g^2 + (e*f*g^2 - d*g^3)*x)) - 1/2*b^2*(log((e*x + d)^n)^2/(g^3*x^2 + 2*f*g^2*x + f^2*g)
- 2*integrate((e*g*x*log(c)^2 + d*g*log(c)^2 + (e*f*n + 2*d*g*log(c) + (e*g*n + 2*e*g*log(c))*x)*log((e*x + d)
^n))/(e*g^4*x^4 + d*f^3*g + (3*e*f*g^3 + d*g^4)*x^3 + 3*(e*f^2*g^2 + d*f*g^3)*x^2 + (e*f^3*g + 3*d*f^2*g^2)*x)
, x)) - a*b*log((e*x + d)^n*c)/(g^3*x^2 + 2*f*g^2*x + f^2*g) - 1/2*a^2/(g^3*x^2 + 2*f*g^2*x + f^2*g)

Giac [F]

\[ \int \frac {\left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(f+g x)^3} \, dx=\int { \frac {{\left (b \log \left ({\left (e x + d\right )}^{n} c\right ) + a\right )}^{2}}{{\left (g x + f\right )}^{3}} \,d x } \]

[In]

integrate((a+b*log(c*(e*x+d)^n))^2/(g*x+f)^3,x, algorithm="giac")

[Out]

integrate((b*log((e*x + d)^n*c) + a)^2/(g*x + f)^3, x)

Mupad [F(-1)]

Timed out. \[ \int \frac {\left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(f+g x)^3} \, dx=\int \frac {{\left (a+b\,\ln \left (c\,{\left (d+e\,x\right )}^n\right )\right )}^2}{{\left (f+g\,x\right )}^3} \,d x \]

[In]

int((a + b*log(c*(d + e*x)^n))^2/(f + g*x)^3,x)

[Out]

int((a + b*log(c*(d + e*x)^n))^2/(f + g*x)^3, x)